home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
DJGPP
/
DJLSR111.ZIP
/
libsrc
/
c
/
gen
/
xrealloc.c
< prev
Wrap
C/C++ Source or Header
|
1992-06-13
|
288b
|
18 lines
#include <stdio.h>
#include <malloc.h>
void *xrealloc(void *buf, unsigned size)
{
void *rv;
if (buf)
rv = realloc(buf, size);
else
rv = malloc(size);
if (rv == 0)
{
fprintf(stderr, "Fatal: realloc returned NULL\n");
exit(1);
}
return rv;
}